;Place a sized ellipse to scale at the station and invert supplied to it.
;
;	AUTHOR: Henry C. Francis
;		425 N. ASHE ST.
;		SOUTHERN PINES, NC 28387
;
;		All rights reserved without prejudice.
;
;	Copyright:	3-2-95
;	Edited:		6-20-96
;
;       PURPOSE:        This program will place a sized ellipse to scale at
;                       the station and invert supplied to it.  It is for
;                       profiles with a vertical scale 10x the horizontal
;                       scale.
;
;
(DEFUN C:MHE ( / smode clayr dimsc styldf stynm styft styht pt1 pt2 pt3 pt4 pt5 pt6)
  (setq smode (getvar"osmode")
        dimsc (getvar"dimscale")
        celev (getvar"elevation")
        pt1 nil
  );setq
  (if c:mklayr nil (load"mklayr"))
  (c:svlayr)
  (setvar "osmode" 0)
(while
  (setq ptx (upoint 0 "" "Pick Station Point" nil nil))
  (setq pty (ureal 1 "" "Enter Elevation" pty))
  (setq pt1 (list (car ptx) (* pty 10) 0))
;  (setq pt1 (upoint 0 "" "Station and Elevation [enter (x,y) or pick]" nil nil))
  (setq sxpsz (uint 0 "" "Pipe size (inches)" (if sxpsz sxpsz nil)))
  (if(and sxpsz pt1)
    (setq pt2 (polar pt1 (/ pi 2.00)
              (if(>(*(/ 3.00 64.00)dimsc)(*(/ sxpsz 12.00)10.00))
                (*(/ 3.00 64.00)dimsc)
                (*(/ sxpsz 12.00)10.00)
              ))
          pt3 (if(>(*(/ 3.00 128.00)dimsc)(/ sxpsz 24.00))
                (strcat "@"(rtos(*(/ 3.00 128.00)dimsc))",0")
                (strcat "@"(rtos(/ sxpsz 24.00))",0")
              )
    );setq
  );if
  (if(or(= modf "XIST")(= modf "EXST")(= modf "DEMO"))
    (setq colr "6")(setq colr "4"))
  (c:mklayr)
  (if sxpsz
    (progn
      (setvar "elevation" (* dimsc 1001))
      (command ".ellipse" pt1 pt2 pt3)
      (setvar "elevation" celev)
    );progn
  );if
);while
  (setvar "osmode" smode)
  (c:rslayr)
);defun
